package com.evildog.workspace.life.application.convert;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.evildog.workspace.common.result.PagedResult;
import com.evildog.workspace.life.application.bo.NoteTagBO;
import com.evildog.workspace.life.application.bo.NoteTagListBO;
import com.evildog.workspace.life.application.bo.NoteTagPageBO;
import com.evildog.workspace.life.application.dto.NoteTagDTO;
import com.evildog.workspace.life.application.dto.NoteTagListDTO;
import com.evildog.workspace.life.application.dto.NoteTagPageDTO;
import com.evildog.workspace.life.application.entity.NoteTag;
import com.evildog.workspace.life.application.entity.NoteTagListDO;
import com.evildog.workspace.life.application.entity.NoteTagPageDO;
import com.evildog.workspace.life.application.model.NoteTagListParam;
import com.evildog.workspace.life.application.model.NoteTagPageParam;
import com.evildog.workspace.life.application.model.NoteTagParam;
import com.evildog.workspace.life.application.vo.NoteTagListVO;
import com.evildog.workspace.life.application.vo.NoteTagPageVO;
import com.evildog.workspace.life.application.vo.NoteTagVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface NoteTagConvert {

    NoteTagConvert INSTANCE = Mappers.getMapper(NoteTagConvert.class);

    NoteTagPageDTO convert(NoteTagPageParam noteTagPageParam);

    NoteTagListDTO convert(NoteTagListParam noteTagListParam);

    NoteTagDTO convert(NoteTagParam noteTagParam);

    @Mapping(target = "isDeleted", ignore = true)
    NoteTag convert(NoteTagDTO noteTagDTO);

    NoteTagPageDO convert(NoteTagPageDTO noteTagPageDTO);

    NoteTagVO convert(NoteTagBO noteTagBO);

    NoteTagBO convert(NoteTag noteTag);

    List<NoteTagListBO> convert(List<NoteTagListDO> noteTagList);

    List<NoteTagListVO> convertVoList(List<NoteTagListBO> noteTagListBO);

    @Mappings({})
    PagedResult<NoteTagPageBO> convert(IPage<NoteTagPageDO> page);

    PagedResult<NoteTagPageVO> convert(PagedResult<NoteTagPageBO> page);

    List<NoteTagBO> convertBOList(List<NoteTag> noteTags);
}